package npap.cater.unr.edu.server.locator;

import com.google.web.bindery.requestfactory.shared.Locator;
import npap.cater.unr.edu.client.domain.File;
import org.springframework.roo.addon.gwt.RooGwtLocator;
import org.springframework.stereotype.Component;

@RooGwtLocator("npap.cater.unr.edu.client.domain.File")
@Component
public class FileLocator extends Locator<File, Long> {

    public File create(Class<? extends npap.cater.unr.edu.client.domain.File> clazz) {
        return new File();
    }

    public File find(Class<? extends npap.cater.unr.edu.client.domain.File> clazz, Long id) {
        return File.findFile(id);
    }

    public Class<npap.cater.unr.edu.client.domain.File> getDomainType() {
        return File.class;
    }

    public Long getId(File file) {
        return file.getId();
    }

    public Class<java.lang.Long> getIdType() {
        return Long.class;
    }

    public Object getVersion(File file) {
        return file.getVersion();
    }
}
